package com.foreknow.dao;

import com.foreknow.model.User;
import org.apache.ibatis.jdbc.SQL;

import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    /**
     * 根据编号查询信息
     * @param id
     * @return
     * @throws SQLException
     */
    public User findUserById(int id)throws SQLException;

    /**
     * 根据用户名查询用户信息列表
     * @param name
     * @return
     * @throws SQLException
     */
    public List<User> findUserByName(String name )throws SQLException;

    /**
     * c添加用户信息
     * @param user
     * @throws SQLException
     */
    public void insertUser(User user) throws SQLException;

    /**
     * 根据id删除用户信息
     * @param id
     * @throws SQLException
     */
    public void deleteUser(int id)throws SQLException;
}


